package com.gwcloud.coffeeman.example.controller;

import com.gwcloud.coffeeman.common.controller.CoffeeAbstractController;
import com.gwcloud.coffeeman.common.utils.LogWriter;
import com.gwcloud.coffeeman.example.utils.TestComponentWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/** 
* @ClassName   : ExampleController 
* @author      : ganwei 
* @date        : 2020年8月16日 
* @Description : 示例程序
*/
@RestController
public class ExampleController extends CoffeeAbstractController {
	@Autowired
	private RedisTemplate<String,String> redisTemplate;
	@Autowired
	private XPbTestMapper xPbTestMapper;

	@RequestMapping("/hello")
	public String sayHello() {
		LogWriter.trace(getClass(),"first dot");
		LogWriter.trace(getClass(),"second dot");
		XPbTestEntity entity = xPbTestMapper.selectByPrimaryKey("1");
		System.out.println(entity.getParam2());
		return TestComponentWrapper.testbean.getName();
	}
}
